package com.lemon.cloud.elasticsearch.config.provider.impl;

import com.lemon.cloud.elasticsearch.config.provider.IndexNameProvider;
import org.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * 每天建立索引
 */
@Component("localDateIndexNameProvider")
public class LocalDateIndexNameProvider implements IndexNameProvider {

    @Override
    public String getSuffix() {
        return LocalDate.now().toString();
    }
}
